/**
 * @param {string} ransomNote
 * @param {string} magazine
 * @return {boolean}
 */
// 赎金信
 var canConstruct = function(ransomNote, magazine) {
    let ctn=new Array(26).fill(0);
    if(ransomNote.length>magazine.length)
    return false;
    for(let c of magazine){
    ctn[c.charCodeAt()-97]++;
    }
    for(let ch of ransomNote){
        ctn[ch.charCodeAt()-97]--;
        if(ctn[ch.charCodeAt()-97]<0){
            return false;
        }
    }
    return true;
    };